{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "0",
   "metadata": {},
   "source": [
    "### 模型v3预测\n",
    "    特征：+指数特征\n",
    "    首次涨停模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-10T04:50:39.545618Z",
     "iopub.status.busy": "2025-07-10T04:50:39.545618Z",
     "iopub.status.idle": "2025-07-10T04:50:39.554585Z",
     "shell.execute_reply": "2025-07-10T04:50:39.554585Z",
     "shell.execute_reply.started": "2025-07-10T04:50:39.545618Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "07_10\n",
      "2025-07-10\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import time,datetime\n",
    "from datetime import date\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.metrics import log_loss\n",
    "import lightgbm as lgb\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score\n",
    "execfile('yanmu_v3/yanmu_util.py')\n",
    "\n",
    "# 获取当前日期\n",
    "today_str = date.today().strftime(\"%m_%d\")\n",
    "out_path = 'output/'\n",
    "print(today_str)\n",
    "\n",
    "date_str = '2025-07-10'\n",
    "print(date_str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "2",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-10T04:50:39.865399Z",
     "iopub.status.busy": "2025-07-10T04:50:39.865399Z",
     "iopub.status.idle": "2025-07-10T04:50:40.798567Z",
     "shell.execute_reply": "2025-07-10T04:50:40.798567Z",
     "shell.execute_reply.started": "2025-07-10T04:50:39.865399Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "131620\n"
     ]
    }
   ],
   "source": [
    "predict_df = pd.read_csv('output/v3_predict_feature.csv')\n",
    "p_col(predict_df)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "3",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-10T04:50:57.979100Z",
     "iopub.status.busy": "2025-07-10T04:50:57.979100Z",
     "iopub.status.idle": "2025-07-10T04:50:57.982613Z",
     "shell.execute_reply": "2025-07-10T04:50:57.982103Z",
     "shell.execute_reply.started": "2025-07-10T04:50:57.979100Z"
    }
   },
   "outputs": [],
   "source": [
    "# list(predict_df.columns)\n",
    "# predict_df[predict_df['date'] =='2025-06-19'][['date', 'code', 'float_mv','open_gap_ratio']].sort_values(by=['open_gap_ratio'])\n",
    "# predict_df"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4",
   "metadata": {},
   "source": [
    "### 一、10cm首板预测\n",
    "    阶段1概率顺位排序（高召回率 + 低精准率）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "5",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-06T02:50:02.799598Z",
     "iopub.status.busy": "2025-07-06T02:50:02.799598Z",
     "iopub.status.idle": "2025-07-06T02:50:03.115201Z",
     "shell.execute_reply": "2025-07-06T02:50:03.115201Z",
     "shell.execute_reply.started": "2025-07-06T02:50:02.799598Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th>open</th>\n",
       "      <th>low</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>open_pct</th>\n",
       "      <th>low_pct</th>\n",
       "      <th>zt_num</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>170</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>601218.SH</td>\n",
       "      <td>4.32</td>\n",
       "      <td>4.13</td>\n",
       "      <td>4.52</td>\n",
       "      <td>4.52</td>\n",
       "      <td>5.11</td>\n",
       "      <td>0.49</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>133</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>603601.SH</td>\n",
       "      <td>4.47</td>\n",
       "      <td>4.47</td>\n",
       "      <td>4.47</td>\n",
       "      <td>4.47</td>\n",
       "      <td>10.10</td>\n",
       "      <td>10.10</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>344</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>603125.SH</td>\n",
       "      <td>18.98</td>\n",
       "      <td>18.52</td>\n",
       "      <td>19.36</td>\n",
       "      <td>19.36</td>\n",
       "      <td>7.84</td>\n",
       "      <td>5.23</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>600319.SH</td>\n",
       "      <td>6.43</td>\n",
       "      <td>6.23</td>\n",
       "      <td>7.18</td>\n",
       "      <td>7.18</td>\n",
       "      <td>-1.53</td>\n",
       "      <td>-4.59</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>002549.SZ</td>\n",
       "      <td>11.33</td>\n",
       "      <td>11.24</td>\n",
       "      <td>11.33</td>\n",
       "      <td>11.33</td>\n",
       "      <td>10.00</td>\n",
       "      <td>9.13</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>605151.SH</td>\n",
       "      <td>21.26</td>\n",
       "      <td>21.26</td>\n",
       "      <td>21.26</td>\n",
       "      <td>21.26</td>\n",
       "      <td>9.59</td>\n",
       "      <td>9.59</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>219</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>000633.SZ</td>\n",
       "      <td>6.77</td>\n",
       "      <td>6.77</td>\n",
       "      <td>6.77</td>\n",
       "      <td>6.77</td>\n",
       "      <td>10.08</td>\n",
       "      <td>10.08</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>278</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>002658.SZ</td>\n",
       "      <td>8.50</td>\n",
       "      <td>8.39</td>\n",
       "      <td>8.61</td>\n",
       "      <td>8.61</td>\n",
       "      <td>8.56</td>\n",
       "      <td>7.15</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>002651.SZ</td>\n",
       "      <td>12.65</td>\n",
       "      <td>12.53</td>\n",
       "      <td>13.22</td>\n",
       "      <td>13.22</td>\n",
       "      <td>5.24</td>\n",
       "      <td>4.24</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>247</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>600192.SH</td>\n",
       "      <td>9.04</td>\n",
       "      <td>8.93</td>\n",
       "      <td>9.41</td>\n",
       "      <td>9.41</td>\n",
       "      <td>5.73</td>\n",
       "      <td>4.44</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           date       code   open    low  close   high  open_pct  low_pct  \\\n",
       "170  2025-07-01  601218.SH   4.32   4.13   4.52   4.52      5.11     0.49   \n",
       "133  2025-07-01  603601.SH   4.47   4.47   4.47   4.47     10.10    10.10   \n",
       "344  2025-07-01  603125.SH  18.98  18.52  19.36  19.36      7.84     5.23   \n",
       "44   2025-07-01  600319.SH   6.43   6.23   7.18   7.18     -1.53    -4.59   \n",
       "87   2025-07-01  002549.SZ  11.33  11.24  11.33  11.33     10.00     9.13   \n",
       "96   2025-07-01  605151.SH  21.26  21.26  21.26  21.26      9.59     9.59   \n",
       "219  2025-07-01  000633.SZ   6.77   6.77   6.77   6.77     10.08    10.08   \n",
       "278  2025-07-01  002658.SZ   8.50   8.39   8.61   8.61      8.56     7.15   \n",
       "105  2025-07-01  002651.SZ  12.65  12.53  13.22  13.22      5.24     4.24   \n",
       "247  2025-07-01  600192.SH   9.04   8.93   9.41   9.41      5.73     4.44   \n",
       "\n",
       "     zt_num  \n",
       "170       2  \n",
       "133       2  \n",
       "344       2  \n",
       "44        2  \n",
       "87        2  \n",
       "96        2  \n",
       "219       2  \n",
       "278       2  \n",
       "105       2  \n",
       "247       2  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "execfile('yanmu_v3/predict_show.py')\n",
    "zt_2_df = show_10cm_zt2_low_precent(predict_df)[['date','code','open','low','close','high','open_pct','low_pct','zt_num']]\n",
    "zt_2_df[-10:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "6",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-06T02:50:03.116203Z",
     "iopub.status.busy": "2025-07-06T02:50:03.115201Z",
     "iopub.status.idle": "2025-07-06T02:50:03.417060Z",
     "shell.execute_reply": "2025-07-06T02:50:03.417060Z",
     "shell.execute_reply.started": "2025-07-06T02:50:03.116203Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th>open</th>\n",
       "      <th>low</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>open_pct</th>\n",
       "      <th>low_pct</th>\n",
       "      <th>zt_num</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>601606.SH</td>\n",
       "      <td>30.38</td>\n",
       "      <td>28.10</td>\n",
       "      <td>31.96</td>\n",
       "      <td>31.96</td>\n",
       "      <td>4.58</td>\n",
       "      <td>-3.27</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>9.89</td>\n",
       "      <td>9.89</td>\n",
       "      <td>9.89</td>\n",
       "      <td>9.89</td>\n",
       "      <td>10.01</td>\n",
       "      <td>10.01</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>002173.SZ</td>\n",
       "      <td>14.06</td>\n",
       "      <td>14.00</td>\n",
       "      <td>15.68</td>\n",
       "      <td>15.68</td>\n",
       "      <td>-1.33</td>\n",
       "      <td>-1.75</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>601718.SH</td>\n",
       "      <td>4.31</td>\n",
       "      <td>4.31</td>\n",
       "      <td>4.31</td>\n",
       "      <td>4.31</td>\n",
       "      <td>9.95</td>\n",
       "      <td>9.95</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        date       code   open    low  close   high  open_pct  low_pct  zt_num\n",
       "1 2025-07-01  601606.SH  30.38  28.10  31.96  31.96      4.58    -3.27       8\n",
       "3 2025-07-01  603316.SH   9.89   9.89   9.89   9.89     10.01    10.01       4\n",
       "0 2025-07-01  002173.SZ  14.06  14.00  15.68  15.68     -1.33    -1.75       3\n",
       "2 2025-07-01  601718.SH   4.31   4.31   4.31   4.31      9.95     9.95       3"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "zt_2_df = show_10cm_zt3_low_precent(predict_df)[['date','code','open','low','close','high','open_pct','low_pct','zt_num']]\n",
    "zt_2_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "7",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-06T02:50:03.417060Z",
     "iopub.status.busy": "2025-07-06T02:50:03.417060Z",
     "iopub.status.idle": "2025-07-06T02:50:03.419304Z",
     "shell.execute_reply": "2025-07-06T02:50:03.419304Z",
     "shell.execute_reply.started": "2025-07-06T02:50:03.417060Z"
    }
   },
   "outputs": [],
   "source": [
    "# plot_min_low_pct_and_neg_count(predict_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "8",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-06T02:50:03.419304Z",
     "iopub.status.busy": "2025-07-06T02:50:03.419304Z",
     "iopub.status.idle": "2025-07-06T02:50:04.435783Z",
     "shell.execute_reply": "2025-07-06T02:50:04.435783Z",
     "shell.execute_reply.started": "2025-07-06T02:50:03.419304Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "181785\n",
      "1163\n"
     ]
    }
   ],
   "source": [
    "execfile('yanmu_v3/predict.py')\n",
    "f_10_type1_final = show_10_type1(predict_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "9",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-06T02:50:32.263883Z",
     "iopub.status.busy": "2025-07-06T02:50:32.262883Z",
     "iopub.status.idle": "2025-07-06T02:50:32.275482Z",
     "shell.execute_reply": "2025-07-06T02:50:32.275482Z",
     "shell.execute_reply.started": "2025-07-06T02:50:32.263883Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>r1</th>\n",
       "      <th>recall_prob</th>\n",
       "      <th>precision_prob</th>\n",
       "      <th>fused_prob</th>\n",
       "      <th>probability_label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>000637.SZ</td>\n",
       "      <td>茂化实华</td>\n",
       "      <td>9.93</td>\n",
       "      <td>0.432</td>\n",
       "      <td>0.055</td>\n",
       "      <td>0.432</td>\n",
       "      <td>高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>000159.SZ</td>\n",
       "      <td>国际实业</td>\n",
       "      <td>10.03</td>\n",
       "      <td>0.362</td>\n",
       "      <td>0.043</td>\n",
       "      <td>0.362</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>002476.SZ</td>\n",
       "      <td>宝莫股份</td>\n",
       "      <td>10.11</td>\n",
       "      <td>0.347</td>\n",
       "      <td>0.062</td>\n",
       "      <td>0.347</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>605268.SH</td>\n",
       "      <td>王力安防</td>\n",
       "      <td>9.98</td>\n",
       "      <td>0.347</td>\n",
       "      <td>0.044</td>\n",
       "      <td>0.347</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>600463.SH</td>\n",
       "      <td>空港股份</td>\n",
       "      <td>10.05</td>\n",
       "      <td>0.309</td>\n",
       "      <td>0.042</td>\n",
       "      <td>0.309</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>002125.SZ</td>\n",
       "      <td>湘潭电化</td>\n",
       "      <td>10.05</td>\n",
       "      <td>0.242</td>\n",
       "      <td>0.045</td>\n",
       "      <td>0.305</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>605580.SH</td>\n",
       "      <td>恒盛能源</td>\n",
       "      <td>10.03</td>\n",
       "      <td>0.244</td>\n",
       "      <td>0.040</td>\n",
       "      <td>0.305</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>000968.SZ</td>\n",
       "      <td>蓝焰控股</td>\n",
       "      <td>9.96</td>\n",
       "      <td>0.234</td>\n",
       "      <td>0.039</td>\n",
       "      <td>0.296</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>603918.SH</td>\n",
       "      <td>金桥信息</td>\n",
       "      <td>9.99</td>\n",
       "      <td>0.198</td>\n",
       "      <td>0.037</td>\n",
       "      <td>0.265</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>002805.SZ</td>\n",
       "      <td>丰元股份</td>\n",
       "      <td>10.03</td>\n",
       "      <td>0.201</td>\n",
       "      <td>0.025</td>\n",
       "      <td>0.263</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date       code  name     r1  recall_prob  precision_prob  \\\n",
       "0  2025-06-19  000637.SZ  茂化实华   9.93        0.432           0.055   \n",
       "1  2025-06-19  000159.SZ  国际实业  10.03        0.362           0.043   \n",
       "2  2025-06-19  002476.SZ  宝莫股份  10.11        0.347           0.062   \n",
       "3  2025-06-19  605268.SH  王力安防   9.98        0.347           0.044   \n",
       "4  2025-06-19  600463.SH  空港股份  10.05        0.309           0.042   \n",
       "5  2025-06-19  002125.SZ  湘潭电化  10.05        0.242           0.045   \n",
       "6  2025-06-19  605580.SH  恒盛能源  10.03        0.244           0.040   \n",
       "7  2025-06-19  000968.SZ  蓝焰控股   9.96        0.234           0.039   \n",
       "8  2025-06-19  603918.SH  金桥信息   9.99        0.198           0.037   \n",
       "9  2025-06-19  002805.SZ  丰元股份  10.03        0.201           0.025   \n",
       "\n",
       "   fused_prob probability_label  \n",
       "0       0.432               高概率  \n",
       "1       0.362              中等概率  \n",
       "2       0.347              中等概率  \n",
       "3       0.347              中等概率  \n",
       "4       0.309              中等概率  \n",
       "5       0.305              中等概率  \n",
       "6       0.305              中等概率  \n",
       "7       0.296              中等概率  \n",
       "8       0.265              中等概率  \n",
       "9       0.263              中等概率  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# date_str='2025-06-05'\n",
    "tmp_10 = f_10_type1_final[f_10_type1_final['date']==date_str].reset_index(drop=True).round(3)\n",
    "# tmp_10 = f_10_type1_final[f_10_type1_final['date']=='2025-06-19'].reset_index(drop=True).round(3)\n",
    "\n",
    "tmp_10.sort_values(by=['fused_prob'],ascending=False).reset_index(drop=True)[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "10",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-06T02:39:15.250737Z",
     "iopub.status.busy": "2025-07-06T02:39:15.249735Z",
     "iopub.status.idle": "2025-07-06T02:39:15.258735Z",
     "shell.execute_reply": "2025-07-06T02:39:15.258735Z",
     "shell.execute_reply.started": "2025-07-06T02:39:15.250737Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>r1</th>\n",
       "      <th>recall_prob</th>\n",
       "      <th>precision_prob</th>\n",
       "      <th>fused_prob</th>\n",
       "      <th>probability_label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [date, code, name, r1, recall_prob, precision_prob, fused_prob, probability_label]\n",
       "Index: []"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# f_10_type1_final[f_10_type1_final['code']=='002125.SZ']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "dab08f55-edb2-4399-9943-1eb87bee34fa",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-05T09:40:37.563411Z",
     "iopub.status.busy": "2025-07-05T09:40:37.562413Z",
     "iopub.status.idle": "2025-07-05T09:40:37.572411Z",
     "shell.execute_reply": "2025-07-05T09:40:37.572411Z",
     "shell.execute_reply.started": "2025-07-05T09:40:37.563411Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>r1</th>\n",
       "      <th>recall_prob</th>\n",
       "      <th>precision_prob</th>\n",
       "      <th>fused_prob</th>\n",
       "      <th>probability_label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>2025-06-06</td>\n",
       "      <td>600082.SH</td>\n",
       "      <td>海泰发展</td>\n",
       "      <td>9.95</td>\n",
       "      <td>0.591049</td>\n",
       "      <td>0.241352</td>\n",
       "      <td>0.709259</td>\n",
       "      <td>高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>238</th>\n",
       "      <td>2025-05-23</td>\n",
       "      <td>002317.SZ</td>\n",
       "      <td>众生药业</td>\n",
       "      <td>10.18</td>\n",
       "      <td>0.531972</td>\n",
       "      <td>0.099327</td>\n",
       "      <td>0.372380</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>263</th>\n",
       "      <td>2025-06-17</td>\n",
       "      <td>002173.SZ</td>\n",
       "      <td>创新医疗</td>\n",
       "      <td>10.01</td>\n",
       "      <td>0.571465</td>\n",
       "      <td>0.175833</td>\n",
       "      <td>0.685758</td>\n",
       "      <td>高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>291</th>\n",
       "      <td>2025-05-19</td>\n",
       "      <td>000695.SZ</td>\n",
       "      <td>滨海能源</td>\n",
       "      <td>10.00</td>\n",
       "      <td>0.460569</td>\n",
       "      <td>0.190467</td>\n",
       "      <td>0.552683</td>\n",
       "      <td>高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>2025-06-13</td>\n",
       "      <td>002015.SZ</td>\n",
       "      <td>协鑫能科</td>\n",
       "      <td>10.06</td>\n",
       "      <td>0.546852</td>\n",
       "      <td>0.260923</td>\n",
       "      <td>0.656222</td>\n",
       "      <td>高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>346</th>\n",
       "      <td>2025-06-10</td>\n",
       "      <td>002480.SZ</td>\n",
       "      <td>新筑股份</td>\n",
       "      <td>9.94</td>\n",
       "      <td>0.524041</td>\n",
       "      <td>0.151282</td>\n",
       "      <td>0.628850</td>\n",
       "      <td>高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>496</th>\n",
       "      <td>2025-06-17</td>\n",
       "      <td>600960.SH</td>\n",
       "      <td>渤海汽车</td>\n",
       "      <td>10.02</td>\n",
       "      <td>0.693724</td>\n",
       "      <td>0.225627</td>\n",
       "      <td>0.832468</td>\n",
       "      <td>极高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>694</th>\n",
       "      <td>2025-06-04</td>\n",
       "      <td>002826.SZ</td>\n",
       "      <td>易明医药</td>\n",
       "      <td>10.10</td>\n",
       "      <td>0.748656</td>\n",
       "      <td>0.310911</td>\n",
       "      <td>0.898387</td>\n",
       "      <td>极高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>793</th>\n",
       "      <td>2025-06-13</td>\n",
       "      <td>002207.SZ</td>\n",
       "      <td>准油股份</td>\n",
       "      <td>9.94</td>\n",
       "      <td>0.634165</td>\n",
       "      <td>0.271441</td>\n",
       "      <td>0.760998</td>\n",
       "      <td>极高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>951</th>\n",
       "      <td>2025-06-03</td>\n",
       "      <td>002246.SZ</td>\n",
       "      <td>北化股份</td>\n",
       "      <td>10.03</td>\n",
       "      <td>0.608205</td>\n",
       "      <td>0.197067</td>\n",
       "      <td>0.729846</td>\n",
       "      <td>高概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1092</th>\n",
       "      <td>2025-06-24</td>\n",
       "      <td>603776.SH</td>\n",
       "      <td>永安行</td>\n",
       "      <td>10.01</td>\n",
       "      <td>0.418262</td>\n",
       "      <td>0.154245</td>\n",
       "      <td>0.501914</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            date       code  name     r1  recall_prob  precision_prob  \\\n",
       "98    2025-06-06  600082.SH  海泰发展   9.95     0.591049        0.241352   \n",
       "238   2025-05-23  002317.SZ  众生药业  10.18     0.531972        0.099327   \n",
       "263   2025-06-17  002173.SZ  创新医疗  10.01     0.571465        0.175833   \n",
       "291   2025-05-19  000695.SZ  滨海能源  10.00     0.460569        0.190467   \n",
       "298   2025-06-13  002015.SZ  协鑫能科  10.06     0.546852        0.260923   \n",
       "346   2025-06-10  002480.SZ  新筑股份   9.94     0.524041        0.151282   \n",
       "496   2025-06-17  600960.SH  渤海汽车  10.02     0.693724        0.225627   \n",
       "694   2025-06-04  002826.SZ  易明医药  10.10     0.748656        0.310911   \n",
       "793   2025-06-13  002207.SZ  准油股份   9.94     0.634165        0.271441   \n",
       "951   2025-06-03  002246.SZ  北化股份  10.03     0.608205        0.197067   \n",
       "1092  2025-06-24  603776.SH   永安行  10.01     0.418262        0.154245   \n",
       "\n",
       "      fused_prob probability_label  \n",
       "98      0.709259               高概率  \n",
       "238     0.372380              中等概率  \n",
       "263     0.685758               高概率  \n",
       "291     0.552683               高概率  \n",
       "298     0.656222               高概率  \n",
       "346     0.628850               高概率  \n",
       "496     0.832468              极高概率  \n",
       "694     0.898387              极高概率  \n",
       "793     0.760998              极高概率  \n",
       "951     0.729846               高概率  \n",
       "1092    0.501914              中等概率  "
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# f_10_type1_final"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "542a40de-70a9-43c1-858b-99d8f7fa14f1",
   "metadata": {},
   "source": [
    "#### 二、预测首板模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "c69feb95-9f78-4c78-b6bb-28612bce7b1d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-10T04:54:01.680538Z",
     "iopub.status.busy": "2025-07-10T04:54:01.679499Z",
     "iopub.status.idle": "2025-07-10T04:54:02.800951Z",
     "shell.execute_reply": "2025-07-10T04:54:02.800951Z",
     "shell.execute_reply.started": "2025-07-10T04:54:01.680538Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "131620\n",
      "2986\n"
     ]
    }
   ],
   "source": [
    "\n",
    "execfile('yanmu_v3/predict.py')\n",
    "f_w_ma_final = show_w_ma(predict_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "66a79372-3644-4650-bf16-a1f39b62dd26",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-10T04:54:02.800951Z",
     "iopub.status.busy": "2025-07-10T04:54:02.800951Z",
     "iopub.status.idle": "2025-07-10T04:54:02.810822Z",
     "shell.execute_reply": "2025-07-10T04:54:02.810822Z",
     "shell.execute_reply.started": "2025-07-10T04:54:02.800951Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>r1</th>\n",
       "      <th>recall_prob</th>\n",
       "      <th>precision_prob</th>\n",
       "      <th>fused_prob</th>\n",
       "      <th>probability_label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>000989.SZ</td>\n",
       "      <td>九芝堂</td>\n",
       "      <td>4.64</td>\n",
       "      <td>0.125</td>\n",
       "      <td>0.031</td>\n",
       "      <td>0.195</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>300991.SZ</td>\n",
       "      <td>创益通</td>\n",
       "      <td>0.06</td>\n",
       "      <td>0.113</td>\n",
       "      <td>0.028</td>\n",
       "      <td>0.182</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>002295.SZ</td>\n",
       "      <td>精艺股份</td>\n",
       "      <td>-0.54</td>\n",
       "      <td>0.111</td>\n",
       "      <td>0.033</td>\n",
       "      <td>0.182</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>300586.SZ</td>\n",
       "      <td>美联新材</td>\n",
       "      <td>2.20</td>\n",
       "      <td>0.113</td>\n",
       "      <td>0.022</td>\n",
       "      <td>0.179</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>000037.SZ</td>\n",
       "      <td>深南电A</td>\n",
       "      <td>0.96</td>\n",
       "      <td>0.107</td>\n",
       "      <td>0.019</td>\n",
       "      <td>0.171</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>003003.SZ</td>\n",
       "      <td>天元股份</td>\n",
       "      <td>0.37</td>\n",
       "      <td>0.106</td>\n",
       "      <td>0.018</td>\n",
       "      <td>0.170</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>300283.SZ</td>\n",
       "      <td>温州宏丰</td>\n",
       "      <td>3.30</td>\n",
       "      <td>0.104</td>\n",
       "      <td>0.019</td>\n",
       "      <td>0.168</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>603086.SH</td>\n",
       "      <td>先达股份</td>\n",
       "      <td>5.41</td>\n",
       "      <td>0.099</td>\n",
       "      <td>0.025</td>\n",
       "      <td>0.165</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>300010.SZ</td>\n",
       "      <td>豆神教育</td>\n",
       "      <td>4.97</td>\n",
       "      <td>0.102</td>\n",
       "      <td>0.013</td>\n",
       "      <td>0.163</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2025-07-10</td>\n",
       "      <td>600052.SH</td>\n",
       "      <td>东望时代</td>\n",
       "      <td>5.67</td>\n",
       "      <td>0.091</td>\n",
       "      <td>0.017</td>\n",
       "      <td>0.153</td>\n",
       "      <td>低概率</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date       code  name    r1  recall_prob  precision_prob  fused_prob  \\\n",
       "0  2025-07-10  000989.SZ   九芝堂  4.64        0.125           0.031       0.195   \n",
       "1  2025-07-10  300991.SZ   创益通  0.06        0.113           0.028       0.182   \n",
       "2  2025-07-10  002295.SZ  精艺股份 -0.54        0.111           0.033       0.182   \n",
       "3  2025-07-10  300586.SZ  美联新材  2.20        0.113           0.022       0.179   \n",
       "4  2025-07-10  000037.SZ  深南电A  0.96        0.107           0.019       0.171   \n",
       "5  2025-07-10  003003.SZ  天元股份  0.37        0.106           0.018       0.170   \n",
       "6  2025-07-10  300283.SZ  温州宏丰  3.30        0.104           0.019       0.168   \n",
       "7  2025-07-10  603086.SH  先达股份  5.41        0.099           0.025       0.165   \n",
       "8  2025-07-10  300010.SZ  豆神教育  4.97        0.102           0.013       0.163   \n",
       "9  2025-07-10  600052.SH  东望时代  5.67        0.091           0.017       0.153   \n",
       "\n",
       "  probability_label  \n",
       "0               低概率  \n",
       "1               低概率  \n",
       "2               低概率  \n",
       "3               低概率  \n",
       "4               低概率  \n",
       "5               低概率  \n",
       "6               低概率  \n",
       "7               低概率  \n",
       "8               低概率  \n",
       "9               低概率  "
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tmp_w_ma = f_w_ma_final[f_w_ma_final['date']==date_str].reset_index(drop=True).round(3)\n",
    "tmp_10_pre = tmp_10_pre[tmp_10_pre['date']=='2025-07-09'].reset_index(drop=True).round(3)\n",
    "\n",
    "tmp_w_ma.sort_values(by=['fused_prob'],ascending=False).reset_index(drop=True)[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "1abfe7d7-3df8-45b5-a242-ea82e5cae3ad",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-10T04:53:38.252227Z",
     "iopub.status.busy": "2025-07-10T04:53:38.251229Z",
     "iopub.status.idle": "2025-07-10T04:53:38.261236Z",
     "shell.execute_reply": "2025-07-10T04:53:38.261236Z",
     "shell.execute_reply.started": "2025-07-10T04:53:38.252227Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>r1</th>\n",
       "      <th>recall_prob</th>\n",
       "      <th>precision_prob</th>\n",
       "      <th>fused_prob</th>\n",
       "      <th>probability_label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2025-06-26</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>诚邦股份</td>\n",
       "      <td>10.07</td>\n",
       "      <td>0.16</td>\n",
       "      <td>0.046</td>\n",
       "      <td>0.234</td>\n",
       "      <td>中等概率</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date       code  name     r1  recall_prob  precision_prob  \\\n",
       "0  2025-06-26  603316.SH  诚邦股份  10.07         0.16           0.046   \n",
       "\n",
       "   fused_prob probability_label  \n",
       "0       0.234              中等概率  "
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# tmp_w_ma[tmp_w_ma['date']=='2025-07-01'].reset_index(drop=True).round(3)\n",
    "f_w_ma_final[f_w_ma_final['code']=='603316.SH'].reset_index(drop=True).round(3)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "028b8636-3452-48ec-b69c-b2792700d986",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-07-09T22:34:07.515493Z",
     "iopub.status.busy": "2025-07-09T22:34:07.514492Z",
     "iopub.status.idle": "2025-07-09T22:34:07.558953Z",
     "shell.execute_reply": "2025-07-09T22:34:07.558953Z",
     "shell.execute_reply.started": "2025-07-09T22:34:07.515493Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th>w_duo1</th>\n",
       "      <th>h_w20</th>\n",
       "      <th>close</th>\n",
       "      <th>ma3w</th>\n",
       "      <th>ma5w</th>\n",
       "      <th>ma8w</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2025-04-02</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-19.89</td>\n",
       "      <td>5.72</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2025-04-03</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-20.17</td>\n",
       "      <td>5.70</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2025-04-07</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-28.15</td>\n",
       "      <td>5.13</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2025-04-08</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-31.37</td>\n",
       "      <td>4.90</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2025-04-09</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-29.27</td>\n",
       "      <td>5.05</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2025-04-10</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-26.47</td>\n",
       "      <td>5.25</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2025-04-11</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-24.23</td>\n",
       "      <td>5.41</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2025-04-14</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-22.97</td>\n",
       "      <td>5.50</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2025-04-15</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-22.41</td>\n",
       "      <td>5.54</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2025-04-16</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-24.65</td>\n",
       "      <td>5.38</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2025-04-17</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-23.95</td>\n",
       "      <td>5.43</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2025-04-18</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-24.65</td>\n",
       "      <td>5.38</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2025-04-21</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-23.53</td>\n",
       "      <td>5.46</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2025-04-22</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-24.23</td>\n",
       "      <td>5.41</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2025-04-23</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-23.53</td>\n",
       "      <td>5.46</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2025-04-24</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-26.33</td>\n",
       "      <td>5.26</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2025-04-25</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-25.77</td>\n",
       "      <td>5.30</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2025-04-28</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-27.45</td>\n",
       "      <td>5.18</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2025-04-29</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-24.51</td>\n",
       "      <td>5.39</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2025-04-30</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-20.03</td>\n",
       "      <td>5.71</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>2025-05-06</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-12.04</td>\n",
       "      <td>6.28</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>2025-05-07</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-10.22</td>\n",
       "      <td>6.41</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>2025-05-08</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-9.38</td>\n",
       "      <td>6.47</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>2025-05-09</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-8.26</td>\n",
       "      <td>6.55</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>2025-05-12</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-7.84</td>\n",
       "      <td>6.58</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2025-05-13</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-9.24</td>\n",
       "      <td>6.48</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2025-05-14</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-9.10</td>\n",
       "      <td>6.49</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>2025-05-15</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-7.84</td>\n",
       "      <td>6.58</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>2025-05-16</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-7.28</td>\n",
       "      <td>6.62</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2025-05-19</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-3.92</td>\n",
       "      <td>6.86</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>2025-05-20</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-2.24</td>\n",
       "      <td>6.98</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>2025-05-21</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-4.34</td>\n",
       "      <td>6.83</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>2025-05-22</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-5.46</td>\n",
       "      <td>6.75</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>2025-05-23</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-7.14</td>\n",
       "      <td>6.63</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>2025-05-26</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-7.14</td>\n",
       "      <td>6.63</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>2025-05-27</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-6.86</td>\n",
       "      <td>6.65</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>2025-05-28</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-5.88</td>\n",
       "      <td>6.72</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>2025-05-29</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-5.74</td>\n",
       "      <td>6.73</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>2025-05-30</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-5.46</td>\n",
       "      <td>6.75</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>2025-06-03</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-5.32</td>\n",
       "      <td>6.76</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>2025-06-04</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-3.92</td>\n",
       "      <td>6.86</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>2025-06-05</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-4.48</td>\n",
       "      <td>6.82</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>2025-06-06</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-1.12</td>\n",
       "      <td>7.06</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>2025-06-09</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>True</td>\n",
       "      <td>-2.10</td>\n",
       "      <td>7.00</td>\n",
       "      <td>6.35</td>\n",
       "      <td>6.21</td>\n",
       "      <td>6.13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>2025-06-10</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>True</td>\n",
       "      <td>-4.90</td>\n",
       "      <td>6.80</td>\n",
       "      <td>6.71</td>\n",
       "      <td>6.42</td>\n",
       "      <td>6.26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>2025-06-11</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>True</td>\n",
       "      <td>-4.06</td>\n",
       "      <td>6.86</td>\n",
       "      <td>7.06</td>\n",
       "      <td>6.64</td>\n",
       "      <td>6.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>2025-06-12</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>True</td>\n",
       "      <td>-3.50</td>\n",
       "      <td>6.90</td>\n",
       "      <td>7.06</td>\n",
       "      <td>6.85</td>\n",
       "      <td>6.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>2025-06-13</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-6.43</td>\n",
       "      <td>6.69</td>\n",
       "      <td>7.06</td>\n",
       "      <td>7.06</td>\n",
       "      <td>6.66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>2025-06-16</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-5.59</td>\n",
       "      <td>6.75</td>\n",
       "      <td>6.94</td>\n",
       "      <td>6.99</td>\n",
       "      <td>6.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>2025-06-17</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-5.87</td>\n",
       "      <td>6.73</td>\n",
       "      <td>6.81</td>\n",
       "      <td>6.91</td>\n",
       "      <td>6.84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>2025-06-18</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-5.59</td>\n",
       "      <td>6.75</td>\n",
       "      <td>6.69</td>\n",
       "      <td>6.84</td>\n",
       "      <td>6.92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>2025-06-19</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-10.07</td>\n",
       "      <td>6.43</td>\n",
       "      <td>6.69</td>\n",
       "      <td>6.76</td>\n",
       "      <td>6.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>2025-06-20</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-9.79</td>\n",
       "      <td>6.45</td>\n",
       "      <td>6.69</td>\n",
       "      <td>6.69</td>\n",
       "      <td>6.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>2025-06-23</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-7.83</td>\n",
       "      <td>6.59</td>\n",
       "      <td>6.61</td>\n",
       "      <td>6.64</td>\n",
       "      <td>6.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>2025-06-24</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-4.76</td>\n",
       "      <td>6.81</td>\n",
       "      <td>6.53</td>\n",
       "      <td>6.59</td>\n",
       "      <td>6.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>2025-06-25</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>-5.59</td>\n",
       "      <td>6.75</td>\n",
       "      <td>6.45</td>\n",
       "      <td>6.55</td>\n",
       "      <td>6.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56</th>\n",
       "      <td>2025-06-26</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>3.92</td>\n",
       "      <td>7.43</td>\n",
       "      <td>6.45</td>\n",
       "      <td>6.50</td>\n",
       "      <td>6.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>2025-06-27</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>False</td>\n",
       "      <td>14.27</td>\n",
       "      <td>8.17</td>\n",
       "      <td>6.45</td>\n",
       "      <td>6.45</td>\n",
       "      <td>6.54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58</th>\n",
       "      <td>2025-06-30</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>True</td>\n",
       "      <td>10.04</td>\n",
       "      <td>8.99</td>\n",
       "      <td>7.02</td>\n",
       "      <td>6.79</td>\n",
       "      <td>6.72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>2025-07-01</td>\n",
       "      <td>603316.SH</td>\n",
       "      <td>True</td>\n",
       "      <td>21.05</td>\n",
       "      <td>9.89</td>\n",
       "      <td>7.87</td>\n",
       "      <td>7.30</td>\n",
       "      <td>7.01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          date       code  w_duo1  h_w20  close  ma3w  ma5w  ma8w\n",
       "0   2025-04-02  603316.SH   False -19.89   5.72   NaN   NaN   NaN\n",
       "1   2025-04-03  603316.SH   False -20.17   5.70  6.00  6.00  6.00\n",
       "2   2025-04-07  603316.SH   False -28.15   5.13  6.00  6.00  6.00\n",
       "3   2025-04-08  603316.SH   False -31.37   4.90  6.00  6.00  6.00\n",
       "4   2025-04-09  603316.SH   False -29.27   5.05  6.00  6.00  6.00\n",
       "5   2025-04-10  603316.SH   False -26.47   5.25  6.00  6.00  6.00\n",
       "6   2025-04-11  603316.SH   False -24.23   5.41  6.00  6.00  6.00\n",
       "7   2025-04-14  603316.SH   False -22.97   5.50  6.00  6.00  6.00\n",
       "8   2025-04-15  603316.SH   False -22.41   5.54  6.00  6.00  6.00\n",
       "9   2025-04-16  603316.SH   False -24.65   5.38  6.00  6.00  6.00\n",
       "10  2025-04-17  603316.SH   False -23.95   5.43  6.00  6.00  6.00\n",
       "11  2025-04-18  603316.SH   False -24.65   5.38  6.00  6.00  6.00\n",
       "12  2025-04-21  603316.SH   False -23.53   5.46  6.00  6.00  6.00\n",
       "13  2025-04-22  603316.SH   False -24.23   5.41  6.00  6.00  6.00\n",
       "14  2025-04-23  603316.SH   False -23.53   5.46  6.00  6.00  6.00\n",
       "15  2025-04-24  603316.SH   False -26.33   5.26  6.00  6.00  6.00\n",
       "16  2025-04-25  603316.SH   False -25.77   5.30  6.00  6.00  6.00\n",
       "17  2025-04-28  603316.SH   False -27.45   5.18  6.00  6.00  6.00\n",
       "18  2025-04-29  603316.SH   False -24.51   5.39  6.00  6.00  6.00\n",
       "19  2025-04-30  603316.SH   False -20.03   5.71  6.00  6.00  6.00\n",
       "20  2025-05-06  603316.SH   False -12.04   6.28  6.00  6.00  6.00\n",
       "21  2025-05-07  603316.SH   False -10.22   6.41  6.00  6.00  6.00\n",
       "22  2025-05-08  603316.SH   False  -9.38   6.47  6.00  6.00  6.00\n",
       "23  2025-05-09  603316.SH   False  -8.26   6.55  6.00  6.00  6.00\n",
       "24  2025-05-12  603316.SH   False  -7.84   6.58  6.00  6.00  6.00\n",
       "25  2025-05-13  603316.SH   False  -9.24   6.48  6.00  6.00  6.00\n",
       "26  2025-05-14  603316.SH   False  -9.10   6.49  6.00  6.00  6.00\n",
       "27  2025-05-15  603316.SH   False  -7.84   6.58  6.00  6.00  6.00\n",
       "28  2025-05-16  603316.SH   False  -7.28   6.62  6.00  6.00  6.00\n",
       "29  2025-05-19  603316.SH   False  -3.92   6.86  6.00  6.00  6.00\n",
       "30  2025-05-20  603316.SH   False  -2.24   6.98  6.00  6.00  6.00\n",
       "31  2025-05-21  603316.SH   False  -4.34   6.83  6.00  6.00  6.00\n",
       "32  2025-05-22  603316.SH   False  -5.46   6.75  6.00  6.00  6.00\n",
       "33  2025-05-23  603316.SH   False  -7.14   6.63  6.00  6.00  6.00\n",
       "34  2025-05-26  603316.SH   False  -7.14   6.63  6.00  6.00  6.00\n",
       "35  2025-05-27  603316.SH   False  -6.86   6.65  6.00  6.00  6.00\n",
       "36  2025-05-28  603316.SH   False  -5.88   6.72  6.00  6.00  6.00\n",
       "37  2025-05-29  603316.SH   False  -5.74   6.73  6.00  6.00  6.00\n",
       "38  2025-05-30  603316.SH   False  -5.46   6.75  6.00  6.00  6.00\n",
       "39  2025-06-03  603316.SH   False  -5.32   6.76  6.00  6.00  6.00\n",
       "40  2025-06-04  603316.SH   False  -3.92   6.86  6.00  6.00  6.00\n",
       "41  2025-06-05  603316.SH   False  -4.48   6.82  6.00  6.00  6.00\n",
       "42  2025-06-06  603316.SH   False  -1.12   7.06  6.00  6.00  6.00\n",
       "43  2025-06-09  603316.SH    True  -2.10   7.00  6.35  6.21  6.13\n",
       "44  2025-06-10  603316.SH    True  -4.90   6.80  6.71  6.42  6.26\n",
       "45  2025-06-11  603316.SH    True  -4.06   6.86  7.06  6.64  6.40\n",
       "46  2025-06-12  603316.SH    True  -3.50   6.90  7.06  6.85  6.53\n",
       "47  2025-06-13  603316.SH   False  -6.43   6.69  7.06  7.06  6.66\n",
       "48  2025-06-16  603316.SH   False  -5.59   6.75  6.94  6.99  6.75\n",
       "49  2025-06-17  603316.SH   False  -5.87   6.73  6.81  6.91  6.84\n",
       "50  2025-06-18  603316.SH   False  -5.59   6.75  6.69  6.84  6.92\n",
       "51  2025-06-19  603316.SH   False -10.07   6.43  6.69  6.76  6.88\n",
       "52  2025-06-20  603316.SH   False  -9.79   6.45  6.69  6.69  6.83\n",
       "53  2025-06-23  603316.SH   False  -7.83   6.59  6.61  6.64  6.75\n",
       "54  2025-06-24  603316.SH   False  -4.76   6.81  6.53  6.59  6.68\n",
       "55  2025-06-25  603316.SH   False  -5.59   6.75  6.45  6.55  6.60\n",
       "56  2025-06-26  603316.SH   False   3.92   7.43  6.45  6.50  6.57\n",
       "57  2025-06-27  603316.SH   False  14.27   8.17  6.45  6.45  6.54\n",
       "58  2025-06-30  603316.SH    True  10.04   8.99  7.02  6.79  6.72\n",
       "59  2025-07-01  603316.SH    True  21.05   9.89  7.87  7.30  7.01"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "predict_df[predict_df['code']=='603316.SH'].reset_index(drop=True).round(3)[['date','code','w_duo1','h_w20','close','ma3w','ma5w','ma8w']]\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
